
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 线索列表
export function getClueList(params) {
  return request({
    url: host + '/clue/list',
    method: 'get',
    params
  })
}

// 线索详情
export function getClue(params) {
  return request({
    url: host + '/clue/detail',
    method: 'get',
    params
  })
}

// /clue/save
export function saveClue(data) {
  return request({
    url: host + '/clue/save',
    method: 'post',
    data
  })
}

// /clue/save
export function updateClue(data) {
  return request({
    url: host + '/clue/update',
    method: 'post',
    data
  })
}

// /clue/save
export function deleteClue(data) {
  return request({
    url: host + '/clue/delete',
    method: 'post',
    data
  })
}

// 线索转移
export function switchClue(data) {
  return request({
    url: host + '/clue/switch',
    method: 'post',
    data
  })
}
// 线索转换
export function transferClue(data) {
  return request({
    url: host + '/clue/transfer',
    method: 'post',
    data
  })
}

// 更新状态 /clue/status
export function updateClueStatus(data) {
  return request({
    url: host + '/clue/status',
    method: 'post',
    data
  })
}
// ​/ clue​/switchDetail  线索转换详情
export function switchClueDetail(params) {
  return request({
    url: host + '/clue/switchDetail',
    method: 'post',
    params
  })
}
